package com.itheima.day16.work;

import java.lang.reflect.Field;

public class ReflectDemo1 {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException, InstantiationException {
        Class<?> aClass = Class.forName("com.itheima.day16.work.Student");
        Field money = aClass.getDeclaredField("money");
        money.setAccessible(true);
        Object o = aClass.newInstance();
        Object o1 = money.get(o);
        System.out.println(o1);
    }
}
